{extend name='public/base'}

{block name="css"}

<script type="text/javascript" src="__ADMIN__/other/echarts/echarts.min.js"></script>
<script type="text/javascript" src="__ADMIN__/other/echarts/echarts.theme.js"></script>

{/block}


{block name='content'}

<div class="layui-col-md12">
    <div class="layui-card">
       <div class="layui-card-header">微信数据统计</div>
    </div>
</div>

<div class="layui-row layui-col-space15">
    <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
            <div class="layui-card-header">
                粉丝数量
                <span class="layui-badge layui-bg-blue layuiadmin-badge">个</span>
            </div>
            <div class="layui-card-body layuiadmin-card-list">
                <p class="layuiadmin-big-font">{$totalFans|default='0'}</p>
            </div>
        </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
            <div class="layui-card-header">
                黑粉数量
                <span class="layui-badge layui-bg-cyan layuiadmin-badge">个</span>
            </div>
            <div class="layui-card-body layuiadmin-card-list">
                <p class="layuiadmin-big-font">{$totalBlack|default='0'}</p>
            </div>
        </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
            <div class="layui-card-header">
                图文总数
                <span class="layui-badge layui-bg-green layuiadmin-badge">条</span>
            </div>
            <div class="layui-card-body layuiadmin-card-list">

                <p class="layuiadmin-big-font">{$totalNews|default='0'}</p>

            </div>
        </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
            <div class="layui-card-header">
                回复数量
                <span class="layui-badge layui-bg-orange layuiadmin-badge">条</span>
            </div>
            <div class="layui-card-body layuiadmin-card-list">
                <p class="layuiadmin-big-font">{$totalRule|default='0'}</p>
            </div>
        </div>
    </div>

</div>

<div class="layui-row layui-col-space15">
    <div class="layui-col-sm12 layui-col-md12" >
        <div class="layui-card" >
            <div class="layui-card-header" >近10个月粉丝趋势</div >
            <div class="layui-card-body" >

                <div class="flot-chart" style="height:350px;width: 100%;">
                    <div class="flot-chart-content" id="table11" style="height:350px; width: 100%">
                        <script type="text/javascript">

                            chart = echarts.init(document.getElementById('table11'));
                            window.onresize = chart.resize;
                            chart.setOption({
                                tooltip: {trigger: 'axis'},
                                grid: {top: '10%', left: '3%', right: '8%', bottom: '3%', containLabel: true},
                                xAxis: [{
                                    type: 'category', scale: false,
                                    boundaryGap: false,
                                    axisLabel: {
                                        color: '#2f9de2',
                                    },
                                    data: eval('{:json_encode($totalJson.xs)}')
                                }],
                                yAxis: [{
                                    type: 'value',
                                    scale: true,
                                    max: function (value) {
                                        return Math.ceil(value.max / 50) * 50 + 100;
                                    },
                                    axisLabel: {
                                        color: '#2f9de2',
                                        formatter: "{value}人"
                                    },
                                    splitLine: {
                                        lineStyle: {
                                            type: 'dashed',
                                            color: '#cccccc'
                                        }
                                    }
                                }],
                                legend: {data: ['粉丝数量', '拉黑粉丝']},
                                series: [
                                    {
                                        type: 'line',
                                        name: '粉丝数量',
                                        label: {normal: {show: true, position: ['30%', '-100%'], offset: [10, -10], formatter: "粉丝{c}人"}},
                                        data: eval('{:json_encode($totalJson.ys._0)}')
                                    },
                                    {
                                        type: 'line',
                                        name: '拉黑粉丝',
                                        label: {normal: {show: true, position: ['30%', '-100%'], offset: [10, -10], formatter: "拉黑{c}人"}},
                                        data: eval('{:json_encode($totalJson.ys._1)}')
                                    }
                                ]
                            });

                        </script>
                    </div>
                </div>


            </div >
        </div >

    </div>

</div>

{/block}